package main

import "fmt"

func main() {
	var slice1 []int = make([]int, 10)

	//赋值
	for i := 0; i < len(slice1); i++ {
		slice1[i] = 5 * i
	}

	//打印切片
	for i := 0; i < len(slice1); i++ {
		fmt.Printf("切片 %d 的值是 %d\n", i, slice1[i])
	}

	fmt.Printf(" length: %d \n", len(slice1))
	fmt.Printf(" cap: %d \n", cap(slice1))
}
